C (1/301)

From:Allan Odgaard
Date:01 Aug 99 at 11:28:39
Subject:Re: (no subject)

From: Allan Odgaard <Duff@DIKU.DK>

On 31-Jul-99, Gregory Roberts II wrote:

> [...]
> A shared library is just that: shared by many processes. Therefore, it
> doesn't have the context that dos.library needs to operate.

I don't think this is entirely true. A library function should be viewed as an
extension of a program, thus has the process-structure of the calling program.
So most DOS functions are callable from a library, granted that library has
been called from a process, even though many DOS functions can actually be
called by tasks.
I think that the only real unsafe thing to do in a library is start printing to
stdout, as the process is likely not to have a stdout, plus 'printf()' doesn't
seem to be re-entrant, atleast not in StormC... :-( But kprintf() works very
well from libs :-)

Regards Allan



URL: http://www.DIKU.dk/students/duff/


Whenever you find that you are on the side of the majority, it is time to
reform.
-- Mark Twain